Method and system of rendering a 3D image for automated facial morphing with a learned generic head model

ABSTRACT

In one aspect, a computerized method for rendering a three-dimensional (3D) digital image for automated facial morphing includes the step scanning of the user&#39;s face with a digital camera to obtain a set of digital images of the user&#39;s face. The method includes the step of determining that a user&#39;s face is in a compliant state. The method includes the step of implementing an analysis of the set of digital images and implementing a set of pre-rendering steps. Each digital image comprises a depth data, a red/green/blue (RGB) data, and a facemask data. The method then implements an iterative closest path (ICP) algorithm that correlates the set of digital images together by stitching together the cloud of points of the facemask data of each digital image and outputs a set of transformation matrices. The method includes the step of implementing a truncated signed distance function (TSDF) algorithm on the set of transformation matrices. The TSDF algorithm represents each point of the transformation matrices in a regularized voxel grid and outputs a set of voxel representations as a one-dimension (1-D) array of voxels. The method includes the step of implementing a marching cubes algorithm that obtains each voxel representation of the 1-D array of voxels and creates a three-dimensional (3D) mesh out of the per-voxel values provided by the TSDF and outputs a mesh representation. The mesh representation comprises a set of triangles and vertices. The method comprises the step of implementing a cleaning algorithm that obtains the mesh representation and cleans the floating vertices and triangles and outputs a mesh. The mesh comprises a set of scattered points with a normal per point. The method includes the step of implementing a Poisson algorithm on the mesh output and fills in any holes of the mesh. The Poisson algorithm outputs a reconstructed mesh. The method fits the reconstructed mesh on a trained three-dimensional (3D) face model and a specified machine learning algorithm is used to fit the trained 3D face model to the 3D landmarks in the reconstructed mesh.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority and is a continuation in part of to U.S. patent application Ser. No. 17/001,682, titled METHOD AND SYSTEM OF RENDERING A 3D IMAGE FOR AUTOMATED FACIAL MORPHING and filed on Aug. 25, 2020. This application is hereby incorporated by reference in its entirety.

U.S. patent application Ser. No. 17/001,682 claims priority to and is a continuation in part of U.S. patent application Ser. No. 16/888,798, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING FOR EYEBROW HAIR AND FACE COLOR DETECTION and filed on 31 May 2020. This application is hereby incorporated by reference in its entirety.

U.S. patent application Ser. No. 16/398,242 is a continuation of and claims priority to U.S. patent application Ser. No. 16/398,242, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING FOR EYEBROW HAIR AND FACE COLOR DETECTION and filed on 29 Apr. 2019. This application is hereby incorporated by reference in its entirety.

U.S. patent application Ser. No. 16/398,242, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING FOR EYEBROW HAIR AND FACE COLOR DETECTION claims priority to U.S. provisional patent application No. 62/664,271, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING and filed on 30 Apr. 2018. This application is hereby incorporated by reference in its entirety.

U.S. patent application Ser. No. 16/398,242, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING FOR EYEBROW HAIR AND FACE COLOR DETECTION claims priority to U.S. provisional patent application No. 62/774,864, titled METHOD AND SYSTEM OF AUTOMATED FACIAL MORPHING and filed on 4 Dec. 2018. This application is hereby incorporated by reference in its entirety.

BACKGROUND 1. Field

This application relates generally to 3D model morphing, and more particularly to a system, method, and article of manufacture of rendering a 3D image for automated facial morphing with a learned generic head model.

2. Related Art

Aesthetic medicine and other cosmetic treatments are increasing in popularity. Treatments in this area can be permanent. Accordingly, patients often wish to view simulation s of the final outcome. Patients also prefer to be able select from a set of possible outcomes. Consequently, various facial morphing methods are used to provide simulated outcomes. However, these methods may use 3D model morphing and often require high-levels of computer processing power and specialized algorithms to adequately model each individual patient's face. These may only be available at a cosmetic-treatment doctor's office. However, patients may wish to try various options on their faces prior to visiting the cosmetic-treatment doctor. Accordingly, improvements to methods of rendering a 3D image for automated facial morphing are desired.

BRIEF SUMMARY OF THE INVENTION

In one aspect, a computerized method for rendering a three-dimensional (3D) digital image for automated facial morphing includes the step scanning of the user's face with a digital camera to obtain a set of digital images of the user's face. The method includes the step of determining that a user's face is in a compliant state. The method includes the step of implementing an analysis of the set of digital images and implementing a set of pre-rendering steps. Each digital image comprises a depth data, a red/green/blue (RGB) data, and a facemask data. The method then implements an iterative closest path (ICP) algorithm that correlates the set of digital images together by stitching together the cloud of points of the facemask data of each digital image and outputs a set of transformation matrices. The method includes the step of implementing a truncated signed distance function (TSDF) algorithm on the set of transformation matrices. The TSDF algorithm represents each point of the transformation matrices in a regularized voxel grid and outputs a set of voxel representations as a one-dimension (1-D) array of voxels. The method includes the step of implementing a marching cubes algorithm that obtains each voxel representation of the 1-D array of voxels and creates a three-dimensional (3D) mesh out of the per-voxel values provided by the TSDF and outputs a mesh representation. The mesh representation comprises a set of triangles and vertices. The method comprises the step of implementing a cleaning algorithm that obtains the mesh representation and cleans the floating vertices and triangles and outputs a mesh. The mesh comprises a set of scattered points with a normal per point. The method includes the step of implementing a Poisson algorithm on the mesh output and fills in any holes of the mesh. The Poisson algorithm outputs a reconstructed mesh. The method fits the reconstructed mesh on a trained three-dimensional (3D) face model and a specified machine learning algorithm is used to fit the trained 3D face model to the 3D landmarks in the reconstructed mesh. The method includes the step of implementing a texture mapping algorithm that outputs a mask representation. The mask representation illustrates each piece of the digital image with texture values and label values. The method includes the step of implementing an image stitching algorithm that stitches the digital images with different lighting values to remove any seams. The image stitching algorithm outputs a single digital image with consistent lighting. The method includes the step of rendering the 3D digital image of the user's face from the single digital image with consistent lighting.

BRIEF DESCRIPTION OF THE DRAWINGS

The present application can be best understood by reference to the following description taken in conjunction with the accompanying figures, in which like parts may be referred to by like numerals.

FIG. 1 illustrates an example process for rendering a 3D image for automated facial morphing, according to some embodiments.

FIG. 2 illustrates an example process for analyze a set of image obtained for rendering a 3D facial image of a user, according to some embodiments.

FIGS. 3-8 illustrate a set of example post scan digital images to be utilized by process for generating a 3D model of a user's face.

FIG. 9 shows an example set of digital images obtained from a scan of the user's face, according to some embodiments.

FIG. 10 illustrates an example digital image of a texture map, according to some embodiments. The texture map is generated from the combination of three images that are then flattened out.

FIG. 11 schematically depicts an example process for automated facial morphing, according to some embodiments.

FIG. 12 illustrates an example process for facial landmark detection, according to some embodiments.

FIG. 13 illustrates an example process for removing acne effects from a digital image of a user, according to some embodiments.

FIG. 14 illustrates an example process for smoothing skin effects in a digital image, according to some embodiments.

FIG. 15 illustrates an example using computer vision and ML for rendering a 3D image for automated facial morphing, according to some embodiments.

FIG. 16 illustrates an example process for rendering a 3D image for automated facial morphing with a learned generic head model, according to some embodiments.

FIG. 17 illustrates an example subset of FLAME models that can be used by process 1600, according to some embodiments.

FIG. 18 illustrates an example 3D face rendering generated using a FLAME model and another 3D face rendering using a cylinder-type shape, according to some embodiments.

FIG. 19 illustrates an example process for implementing FLAME operations in a cloud-computing platform, according to some embodiments.

FIG. 20 illustrates an example process for implementing FLAME operations on a mobile device, according to some embodiments.

FIG. 21 illustrates an example process for implementing FLAME operations in a cloud-computing platform-based application, according to some embodiments.

FIG. 22 illustrates an example FLAME texture mapping process, according to some embodiments.

FIG. 23 illustrates an additional FLAME texture mapping process, according to some embodiments.

FIG. 24 illustrates an example process for creating a mask for ears and hair, according to some embodiments.

FIG. 25 illustrates an example process for excluding a frontal part of an old scan's face mesh, according to some embodiments.

FIG. 26 illustrates an example process for rendering FLAME to generate a final mesh, according to some embodiments.

FIG. 27 depicts an exemplary computing system that can be configured to perform any one of the processes provided herein.

The Figures described above are a representative set and are not an exhaustive with respect to embodying the invention.

DESCRIPTION

Disclosed are a system, method, and article of manufacture for rendering a 3D image for automated facial morphing with a learned generic head model. The following description is presented to enable a person of ordinary skill in the art to make and use the various embodiments. Descriptions of specific devices, techniques, and applications are provided only as examples. Various modifications to the examples described herein will be readily apparent to those of ordinary skill in the art, and the general principles defined herein may be applied to other examples and applications without departing from the spirit and scope of the various embodiments.

Reference throughout this specification to “one embodiment,” “an embodiment,” “one example,” or similar language means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment,” “in an embodiment,” and similar language throughout this specification may, but do not necessarily, all refer to the same embodiment.

Furthermore, the described features, structures, or characteristics of the invention may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided, such as examples of programming, software modules, user selections, network transactions, database queries, database structures, hardware modules, hardware circuits, hardware chips, etc., to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art can recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.

The schematic flow chart diagrams included herein are generally set forth as logical flow chart diagrams. As such, the depicted order and labeled steps are indicative of one embodiment of the presented method. Other steps and methods may be conceived that are equivalent in function, logic, or effect to one or more steps, or portions thereof, of the illustrated method. Additionally, the format and symbols employed are provided to explain the logical steps of the method and are understood not to limit the scope of the method. Although various arrow types and line types may be employed in the flow chart diagrams, and they are understood not to limit the scope of the corresponding method. Indeed, some arrows or other connectors may be used to indicate only the logical flow of the method. For instance, an arrow may indicate a waiting or monitoring period of unspecified duration between enumerated steps of the depicted method. Additionally, the order in which a particular method occurs may or may not strictly adhere to the order of the corresponding steps shown.

Definitions

ARKit® is an API tool for developers working on virtual reality and augmented reality applications. The ARKit tool can accurately map a surrounding or object using SLAM (Simultaneous Localization and Mapping). Third-party developers can use ARKit to build augmented reality applications, leveraging a mobile device's camera, CPU, GPU, and motion sensors. ARKit can provide a face mesh showing automatic estimation of the real-world directional lighting environment. It is noted that in other embodiments, other relevant tools can be used in lieu of ARKit.

Computer vision is an interdisciplinary field that deals with how computers can be made for gaining high-level understanding from digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human visual system can do.

Deep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers. There are different types of neural networks but they always consist of the same components: neurons, synapses, weights, biases, and functions. These components functioning similar to the human brains and can be trained like any other ML algorithm.

Dlib is a general-purpose cross-platform software library written in the programming language C++.

Edge detection includes a variety of mathematical methods that aim at identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities.

FLAME (Faces Learned with an Articulated Model and Expressions) is a lightweight and expressive generic head model learned from over 33,000 of accurately aligned 3D scans. FLAME can provide the trained three-dimensional (3D) face models. Tensorflow® can be used to load and sample the model, and to fit the model to 3D landmarks.

Image stitching can include the process of combining multiple photographic images with overlapping fields of view to produce a segmented panorama or high-resolution image.

Iterative closest path (ICP) can be an algorithm employed to minimize the difference between two clouds of points. ICP can implement computationally accurate and efficient registration of 3-D shapes which includes free form curves and surface. ICP is often used to reconstruct 3D surfaces from various scans, etc.

Low-pass filter (LPF) is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filter design.

Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of computer programs that can teach themselves to grow and change when exposed to new data. Example machine learning techniques that can be used herein include, inter alia: decision tree learning, association rule learning, artificial neural networks, inductive logic programming, support vector machines, clustering, Bayesian networks, reinforcement learning, representation learning, similarity, and metric learning, and/or sparse dictionary learning.

Marching cubes is a computer graphics algorithm for extracting a polygonal mesh of an isosurface from a three-dimensional discrete scalar field (e.g. a voxel).

Metal® is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API. Metal® can provide functions including, inter alia: image filtering algorithms, neural network processing, advance math operations, ray tracing, etc. It is noted that other systems (e.g. Vulkan® and DirectX 12®, etc.) can be utilized.

OpenCV (Open-Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision.

Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics.

3D computer graphics can be computer graphics that use a three-dimensional representation of geometric data.

RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors.

Rendering or image synthesis is the automatic process of generating a photorealistic or non-photorealistic image from a 2D or 3D model (and/or models in what collectively could be called a scene file) by means of computer programs.

Signed distance function of a set Ω in a metric space determines the distance of a given point x from the boundary of Ω, with the sign determined by whether x is in Ω. The function has positive values at points x inside Ω, it decreases in value as x approaches the boundary of Ω where the signed distance function is zero, and it takes negative values outside of Ω.

TensorFlow is a library for machine learning. TensorFlow can be used across a range of tasks but has a particular focus on training and inference of deep neural networks. TFLite (TensorFlow Lite) can be a set of tools that enables on-device machine learning by running ML models on mobile devices (e.g. in a mobile-device application), embedded devices, and IoT devices.

Texture mapping can be a method for defining high frequency detail, surface texture, or color information on a computer-generated graphic or 3D model.

Truncated signed distance function (TSDF) can be a volumetric scene representation that enables for integration of multiple depth images taken from different viewpoints.

Voxel represents a value on a regular grid in three-dimensional space. A voxel can be used by a rendering system to infer the position of a voxel based upon its position relative to other voxels (e.g., its position in the data structure that makes up a single volumetric image).

EXAMPLE METHOD FOR GENERATING A 3D MODEL OF A USER'S FACE

Example embodiments of an automated facial morphing application can be used enable plastic surgery candidates to view digital renderings of images that the candidate will appear like after cosmetic surgery. The automated facial morphing application can ‘automate’ the candidate's experience by evaluating the candidate's face and automatically applying facial elements such as a preferred eyebrow, a preferred nose, etc. It is noted that previously facial morphing system were not automated and limited to expensive systems available in a doctor's office. In contrast, the automated facial morphing application can implement this facial morphing experience to a mobile device and can be managed by the plastic surgery candidate without professional assistance. The automated facial morphing application can be used to preview facial morphing in anticipation of, inter alia: facelifts, rhinoplasties, lip augmentations, eyebrow adjustments, etc. The automated facial morphing application can identify facial features by extracting landmarks, or features, from an image of the subject's face. For example, an algorithm may analyze the relative position, size, and/or shape of the eyes, nose, cheekbones, and jaw.

In one example, the mobile device system can include a facial recognition camera system. This can be a depth-sensing camera system. The depth-sensing camera system can include a dot projector. The dot projector can project n-number of dots (e.g. 30,000 dots, etc.) onto a user's face. The depth-sensing camera system can include an infrared camera that reads the dot pattern and captures an infrared digital image. The digital image of the dots can be used to build a facial map of the user. The depth-sensing camera system can include a flood illuminator. The flood illuminator can provide an infrared projection light source.

In one example, the depth-sensing camera system can be a TRUEDEPTH® camera (e.g. as used in an IPHONE® mobile device, etc.). In one example, the TrueDepth camera can be 7-megapixel and have an f/2.2 aperture. The mobile device system can implement face detection and HDR.

FIG. 1 illustrates an example process 100 for 3D morphable image of a user's face, according to some embodiments. In step 102, process 100 can determine whether the user's head/face is in a compliant state? For example, process 100 can determine if the user's face is straight (e.g. the central axis of the user's face is perpendicular to a horizontal plane, etc.). Parameters for a compliant state can include, inter alia: user is looking straight ahead, no hair in user's face, user not smiling, etc. Process 100 can push messages (e.g. text messages with an application, voice-based instructions, haptic feedback, etc.) that instruct the user to, inter alia: “look straight ahead”, “pull hair back”, “don't smile”, etc. Process 100 can repeat the instructions until the user is in a compliant state.

Process 100 can proceed to step 104. In step 104, process 100 can implement a scan of the user's face. FIG. 9 infra shows an example set of digital images obtained from a scan of the user's face, according to some embodiments. The user can place their head in the various positions shown. For example, a user can look to the right, to the center, to the left and the upward. In other example embodiments, other positions and/or sequences of head movement can be utilized. During the movement of the user's head, process 100 can take a series of around 75 images with corresponding depth information (e.g. using from a TrueDepth camera systems and/or similar camera system such as described supra, etc.). The mobile device implementing process 100 can obtain the depth information of the various digital images. Process 100 can obtain a series of digital RGB photos in bursts. The digital RGB photos can be combined with the depth information from depth-sensing camera system. It is noted that in some embodiments, a digital video is not obtained, but rather a series of digital-image frames and the depth information corresponding to each respective digital-image frame.

Process 100 can then proceed to step 106. In step 106, process 100 can implement analysis of digital images and various pre-rendering steps. FIG. 2 illustrates an example process 200 for analyze a set of images obtained for rendering a 3D facial image of a user, according to some embodiments. Process 200 can be used for processing the digital images post scan but pre-render of the 3D model.

In step 202, process 200 can implement an ICP algorithm (e.g. an OpenCV ICP algorithm, etc.). Process 200 can optimize between a first view and the other views. The points can be chosen by using ARKit face mask to ensure that they are only located on the user's face. The inputs can include, inter alia: depth image (e.g. a file path), RGB Image (File path), ARKit Facemask (e.g. file path), etc. The ICP stitches together the points from the facemask (e.g. the facemask sits on a user's face) and the correlated images. The outputs of step 202 can include the transformations, etc.

In step 204, process 200 can implement a TSDF algorithm on the output of step 202. The TSDF algorithm represents the points in a regularized voxel grid. The inputs in step 204 include, inter alia: transformations, depth image. The TSDF algorithm can continue to blend and match together all the digital images. For example, meshes with triangles and vertices of the output of the ICP step 202 can be blended and matched in one uniform object. The output of step 204 includes a voxel representation (e.g. a 1-D array of voxels).

The remaining steps, as shown infra, provide cleaning steps to clear out floating vertices (e.g. an artifact that is outside of the face), fill in holes between meshed together images, implement texture mapping, image stitching (e.g. obtain texture map of the three images and combine and image stitch this into a single image), etc.

In step 206, process 200 can implement a marching cubes algorithm. Step 206 obtains a voxel representation (e.g. 1-D array of voxels). Process 200 can create a 3D mesh out of per-voxel values provided by the TSDF inputs. Step 206 outputs a mesh representation (e.g. triangles and vertices).

In step 208, process 200 implements cleaning algorithms. Step 208 obtains the Mesh Outputs of step 206. Process 200 then cleans the floating vertices and triangles. Process 200 can clean various patches on the back of the head. Process 200 can clean around patches neck. Step 208 can output a mesh (e.g. scattered points with a normal per point).

In step 210, process 200 can implement various Poisson algorithms on the mesh output of step 208. Process 200 uses the Poisson algorithm to fill in the holes of the mesh. The output of step 210 can be a reconstructed mesh that is passed to step 212.

In step 212, process 200 can implement texture mapping. Process 200 can use a FLAME model to map the texture constructed by three images coming from the three different views. The inputs of step 212 can be the mesh output of step 210, three RGB images and the transformation matrices calculated through ICP algorithm. Step 212 can output a texture (e.g. saved as “pixels.png” in a document directory of the mobile-device application). Step 212 can also create a “labels.png” as a mask representation that illustrates each piece of the image comes from a different source.

In step 214, process 200 can implement image stitching. Process 200 can stitch images with different lighting to remove seams. Step 214 can receive the single image consists of multiple images with different lighting. A label image that consists of one specific label color for each piece of image that comes from different lighting. Step 214 can output one image with consistent lighting over all pieces (e.g. “texture.png”).

Returning to process 100, the output of (e.g. the output of process 200) can be provided in step 108. In step 108, process 100 can render the 3D image user's face. The 3D model can be rendered using a custom library with an internal SDK as well. A hardware-accelerated 3D graphic and compute shader application programming interface (API) can be used to render it (e.g. METAL®, etc.). The rendering can be displayed in a mobile-device application display.

In step 110 process 100 can implement post rendering operations (e.g. automated and/or manual facial morphing processes, etc.). Example automated facial morphing processes, can include, inter alia: ability to segregate face into regions for injectables; under-eye bag removal; blepharoplasty morphing; jawline reduction; beard detection; autocorrection of crooked noses; etc. Additional processes that can be implemented with the 3D model include processes 1100-1400 discussed infra.

EXAMPLE DIGITAL IMAGES

FIGS. 3-8 illustrate a set of example post scan digital images 800 to be utilized by process 200 for generating a 3D model of a user's face. The set of example post scan digital images can be generated from set of digital images 900.

FIG. 9 shows an example set of digital images 900 obtained from a scan of the user's face, according to some embodiments.

FIG. 10 illustrates an example digital image of a texture map 1000, according to some embodiments. The texture map is generated from the combination of three images that are then flattened out.

ADDITIONAL EXAMPLE PROCESSES

FIGS. 11-14 illustrate additional example automated facial morphing processes according to some embodiments.

FIG. 11 schematically depicts an example process 1100 for automated facial morphing, according to some embodiments. More specifically, in step 1102, process 1100 can implement facial landmark detection. In step 1104, process 1100 can implement facial morphing. In step 1106, process 1100 can implement model retraining. In step 1108, process 1100 can implement hair color detection.

FIG. 12 illustrates an example process 1200 for facial landmark detection, according to some embodiments. It is noted that facial landmark detection is different from facial recognition in the sense that landmark detection is the process of identifying facial features on a face. In one example, process 1100 can use various open-source tool (e.g. Dlib, etc.) to do an initial phase of facial landmark detection. However, because of the level of detail that is to be obtained around a specified set of the features, such as: eyebrow, nose, and lip detection. Process 1200 can generate an n-point model (e.g. seventy-eight (78) point model, eighty-five (85) point model, etc.) that provides a higher resolution on the eyebrow in particular.

More specifically, in step 1202, process 1200 can use Dlib for facial landmark detection. In step 1204, process 1200 can use additional facial landmark detection on output of step 1202 with a higher resolution seventy-eight (78) point model that focuses on the eyebrow region. In step 1206, process 1200 can implement hair/eyelid detection using OpenCV as well as doing fast edge detection using a structured forest model. In step 1208, process 1200 can compensate for poor lighting/face angles using an OpenCV heuristics mechanism. It is noted that in some example embodiments another computer vision library can be used in lieu of OpenCV. Additionally, in some example embodiments, an n-point model other than a seventy-eight (78) point model can be utilized.

Returning to process 1100. Process 1100 can implement facial morphing by morphing the following areas of the face: skin, lips, eyebrows, nose, etc. These morphs can be implemented using OpenGL on an iOS device in one example.

Process 1100 can implement model retraining. Process 1100 can feed production images back into the model. This can enable process 1100 to retrain the model periodically and improve the detection of facial landmark features on a wider variety of user segments (e.g. various ages, ethnicities, lighting, etc.). It is noted that process 1100 can be modified to detect if the user is we

FIG. 13 illustrates an example process 1300 for removing acne effects from a digital image of a user, according to some embodiments. Process 1300 can be used to remove the redness in a digital image of a user's face that is associated with acne.

In step 1302, process 1300 can determine the skin color that represents the whole face. IN step 1304, process 1300 can detect the red area compared to the skin color. In step 1306, process 1300 can convert the area of step 1304 to the skin color (e.g. same hue/sat/lum/etc.).

FIG. 14 illustrates an example process 1400 for smoothing skin effects in a digital image, according to some embodiments. Process 1400 can be used to smooth skin effects of a user's face in a digital image.

In step 1402, process 1400 can detect edges from a black and white digital image. The black and white digital image can be of a user's face. In step 1404, process 1400 can process the edges and get the regions that contain noise. In step 1406, process 1400 can set the mask that covers the detailed area (e.g. eyes, nose, and mouth). In step 1408, process 1400 can remove area of step 1406 from area of step 1404. In step 1410, process 1400 can apply a strong LPF to the area of step 1408.

FIG. 15 illustrates an example using computer vision and ML for rendering a 3D image for automated facial morphing, according to some embodiments. In step 1502, the user scans a face. In step 1504, the scan information is used to collect specified 2D landmark information and various ML classification methods on the user's image. Process 1400 performs reconstruction modelling of the users face in 3D space. In step 1506, process 1500 users can then perform a plastic surgery simulation so that they can visualize what they may look like after a plastic surgery treatment User can then find providers in their local area and book a treatment with said providers.

FIG. 16 illustrates an example process for rendering a 3D image for automated facial morphing with a learned generic head model (e.g. FLAME-based etc.), according to some embodiments. In step 1602, process 1600 implements three-dimension (3D) capturing. Process 16000 can use a software development kit that enables the building of augmented reality applications (e.g. ARCore®, etc.) to detect face and generate a facemask. Process 1600 can use a specified multimedia framework for working with audiovisual media (e.g. iOS AVFoundation, etc.) to deliver RGB and depth image3D.

In step 1604, process 1600 implements face reconstruction. Process 1600 can use (e.g. openCV, C++, objective C, etc.) to implement the reconstruction pipeline. Process 1600 can use marching cubes, Poisson reconstruction, seamless image stitching, etc. Process 200 provides an example method of implement specified portions of step 1604.

Poisson reconstruction can reconstruct 3D surfaces from point samples using the solution to a Poisson equation. In Poisson reconstruction, process 1600 can compute a 3D indicator function. The indicator function can be defined as 1 at points inside the model, and 0 at points outside. Process 1600 can obtain the reconstructed surface by extracting an appropriate isosurface.

In step 1606, process 1600 implement FLAME fitting. For example, process 1600 can use a specified Python library to run a FLAME fitting optimization on a cloud-computing platform. Process 1600 use TFLite to run the optimization on the mobile device itself. Process 1600 use TFLite to implement specified FLAME operations in the digital renderings of images that the candidate will appear like after cosmetic surgery (e.g. rotating the head portion in the view, morphing the face portion, etc.).

In some embodiments, a FLAME model can work with an existing graphics functionality and be fit to already utilized data. FLAME model(s) can utilize a linear shape space trained from a specified number (e.g. 3800, etc.) of scans of human heads. The FLAME model can combine the linear shape space with, inter glia: an articulated jaw, neck, and eyeballs, pose-dependent corrective blend shapes, and additional global expression blend shapes. Additionally, various pose and expression dependent articulations can be learned from four-dimensional (4D) face sequences in the D3DFACS dataset along with additional 4D sequences.

In some examples, process 1600 can use a specified number (e.g. fifteen, etc.) still digital images of a user's head, stitch the still images together. However, process 1600 may not wrap the still images around a cylinder, but instead uses a specified face model. The digital images can be wrapped around a real human-head model taken from human-head model database (e.g. the FLAME model database, etc.). The FLAME model can be used to retarget the initial scan and depth information and the digital still image can be wrapped around the retargeted human model. Color can be added. This method can provide more realism as a human head model within specified tuned parameters is used. The human head model can be a model that is tuned to meet a set of male users and female users. The face model can be tuned using the base shape.

FIG. 17 illustrates an example subset of FLAME models 1700 that can be used by process 1600, according to some embodiments. A specified FLAME model can be used for 3D face modeling. It is noted that FLAME models can include variations for such variables as, inter alia: shape, expression, pose, appearance, etc. Example subset of FLAME models 1700 are provided by the Max Planck Institute for Intelligent Systems and the Max-Planck-Gesellschaft zur Förderung der Wissenschaften.

FIG. 18 illustrates an example 3D face rendering generated using a FLAME model and another 3D face rendering using a cylinder-type shape, according to some embodiments. As shown, leveraging a selected FLAME model for the 3D face rendering processes provided herein (e.g. process 200 and/or process 1600) increases the accuracy and resolution. It is noted that FLAME fitting methods are used for inside of face portion of the 3D face rendering. In the portions outside of the face portion, the rendering methods provided herein can use other methods (e.g. for hair placement, etc.).

FIG. 19 illustrates an example process 1900 for implementing FLAME operations in a cloud-computing platform, according to some embodiments. It is noted that FLAME operations can be performed in a cloud-computing platform. For example, process 1900 can use optimization code that is run in a cloud-based server to perform FLAME fitting on model 1804 in step 1902. The results can be returned to a 3D rendering application in the mobile device to implement texture mapping and rendering the 3D mesh in step 1904 to generate model 1802.

FIG. 20 illustrates an example process 2000 for implementing FLAME operations on a mobile device, according to some embodiments. Accordingly, in this example, FLAME operations can be performed on the mobile device. In one example, process 2000 can convert the model 1804 using specified Python scripts to generate a TFLite model as model 1802 and run it on device (e.g. using objective C) in step 2002. Process 2000 can also do texture mapping and rendering the 3D mesh.

FIG. 21 illustrates an example process 2100 for implementing FLAME operations in a cloud-computing platform sever, according to some embodiments. Process 2100 can obtain an older scan of a mesh representation 2102 (e.g. a Mesh.ply file). Process 2100 can obtain DLIB landmarks 2104 (e.g. landmarks.txt). The mesh representation 2102 and DLIB landmarks 2104 can be FLAME fitting (e.g. in the cloud-computing platform sever) 1902 and a FLAME output 2106 (e.g. as a Mesh_fitting.obj) can be generated.

Returning to process 1600, in step 1608, process 1600 implements texture mapping and rendering 3D model. Process 1600 can use texture mapping by using a specified graphics rendering functionality. For example, process 1600 can use Metal® (or a similar system) to perform graphics rendering and parallel computing directly on the GPU. Image stitching can be used to combining the multiple photographic images with overlapping fields of view (e.g. using in C++ and/or objective C programs, etc.). The 3D model can use Metal® as well, in some embodiments.

FIG. 22 illustrates an example FLAME texture mapping process 2200, according to some embodiments. Process 2200 can be implemented using a graphics processing unit API (e.g. Metal®). Process 2200 can provide mesh representation 2102 and a set of different views images 2202 to graphics rendering and parallel computing 2204 (e.g. using Metal®, etc.). Step 2204 can generate pixels.png 2206. Process 2200 can then implement image stitching 2206 and output texture_FLAME.png 2208. Process 2200 by be used by step 1608 for texture mapping.

FIG. 23 illustrates an additional FLAME texture mapping process 2300, according to some embodiments. Process 2300 can be implemented on the mobile device. Process 2300 can be used by step 1608 for texture mapping. In step 2304, process 2300 can convert FLAME texture (e.g. texture_FLAME.png) 2302 to cylindrical spherical texture 2306. Cylindrical spherical texture 2306 and an old scan texture (e.g. texture.png) 2308 can be input into step 2310. In step 2310, process 2300 can implement a normal cloning process. The output can be final texture for hair and ears (e.g. texture_cloned.png) 2312.

FIG. 24 illustrates an example process 2400 for creating a mask for ears and hair, according to some embodiments. Process 2400 can obtain FLAME output 2106 (e.g. as a Mesh_fitting.obj). This can be combined with a list of no hair triangles 2104 (e.g. a nonHairTriangles.txt) and rendered (e.g. METAL®, etc.) to generate a mask to exclude face frontal part from old scan 2406 (e.g. nonHairTex.png).

FIG. 25 illustrates an example process for excluding a frontal part of an old scan's face mesh, according to some embodiments. As shown 2312, 2406 and 1804 are used to generate the excluded frontal part of the old scan's face mesh 2502 for rendering.

FIG. 26 illustrates an example process 2600 for rendering FLAME to generate a final mesh, according to some embodiments. As shown process 1600 combines FLAME rendering 2602 and excluded frontal part of the old scan's face mesh 2502 to generate final mesh 2604.

EXAMPLE COMPUTING SYSTEMS

FIG. 27 depicts an exemplary computing system 2700 that can be configured to perform any one of the processes provided herein. In this context, computing system 2700 may include, for example, a processor, memory, storage, and I/O devices (e.g., monitor, keyboard, disk drive, Internet connection, etc.). However, computing system 2700 may include circuitry or other specialized hardware for carrying out some or all aspects of the processes. In some operational settings, computing system 2700 may be configured as a system that includes one or more units, each of which is configured to carry out some aspects of the processes either in software, hardware, or some combination thereof.

FIG. 27 depicts computing system 2700 with a number of components that may be used to perform any of the processes described herein. The main system 2702 includes a motherboard 2704 having an I/O section 2706, one or more central processing units (CPU) 2708, and a memory section 2710, which may have a flash memory card 2712 related to it. The I/O section 2706 can be connected to a display 2714, a keyboard and/or other user input (not shown), a disk storage unit 2716, and a media drive unit 2718. The media drive unit 2718 can read/write a computer-readable medium 2720, which can contain programs 2722 and/or data. Computing system 2700 can include a web browser. Moreover, it is noted that computing system 2700 can be configured to include additional systems in order to fulfill various functionalities. In another example, computing system 2700 can be configured as a mobile device and include such systems as may be typically included in a mobile device such as GPS systems, gyroscope, accelerometers, cameras, etc.

CONCLUSION

Although the present embodiments have been described with reference to specific example embodiments, various modifications and changes can be made to these embodiments without departing from the broader spirit and scope of the various embodiments. For example, the various devices, modules, etc. described herein can be enabled and operated using hardware circuitry, firmware, software or any combination of hardware, firmware, and software (e.g., embodied in a machine-readable medium).

In addition, it will be appreciated that the various operations, processes, and methods disclosed herein can be embodied in a machine-readable medium and/or a machine accessible medium compatible with a data processing system (e.g., a computer system), and can be performed in any order (e.g., including using means for achieving the various operations). Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. In some embodiments, the machine-readable medium can be a non-transitory form of machine-readable medium. 

What is claimed as new and desired to be protected by Letters Patent of the United States is:
 1. A computerized method for rendering a three-dimensional (3D) digital image for automated facial morphing comprising: scanning of a user's face with a digital camera to obtain a set of digital images of the user's face; determining that the user's face is in a compliant state; implementing an analysis of the set of digital images and implementing a set of pre-rendering steps by: wherein each digital image comprises a depth data, a red/green/blue (RGB) data, and a facemask data, implementing an iterative closest path (ICP) algorithm that correlates the set of digital images together by stitching together a cloud of points of the facemask data of each digital image and outputs a set of transformation matrices, implementing a truncated signed distance function (TSDF) algorithm on the set of the transformation matrices, wherein the TSDF algorithm represents each point of the transformation matrices in a regularized voxel grid and outputs a set of voxel representations as a one-dimension (1-D) array of voxels, implementing a marching cubes algorithm that obtains each voxel representation of the 1-D array of voxels and creates a three-dimensional (3D) mesh out of the per-voxel values provided by the TSDF and outputs a mesh representation, wherein the mesh representation comprises a set of triangles and vertices, implementing a cleaning algorithm that obtains the mesh representations and cleans a floating vertices and triangles and outputs a mesh, wherein the mesh comprises a set of scattered points with a normal per point, implementing a Poisson algorithm on the mesh output and fills in any holes of the mesh, wherein the Poisson algorithm outputs a reconstructed mesh, fitting the reconstructed mesh on a trained three-dimensional (3D) face model, wherein a specified machine learning algorithm is used to fit the trained 3D face model to a 3D landmarks in the reconstructed mesh; implementing a texture mapping algorithm that outputs a mask representation, wherein the mask representation illustrates each piece of the digital image with texture values and label values, and implementing an image stitching algorithm that stitches the digital images with different lighting values to remove any seams; and outputs a single digital image with consistent lighting; and rendering the 3D digital image of the user's face from the single digital image with consistent lighting, wherein the fitting of the reconstructed mesh to a FLAME (Faces Learned with an Articulated Model and Expressions) model is performed only for a face portion of the user's face, and wherein the FLAME model comprises a linear shape space trained from a specified number of scans of human heads.
 2. The computerized method of claim 1, wherein the trained three-dimensional (3D) face model comprises the FLAME model.
 3. The computerized method of claim 2, wherein the machine learning comprises a Deep Neural Network algorithm.
 4. The computerized method of claim 3, wherein the machine learning comprises a TENSORFLOW algorithm.
 5. The computerized method of claim 4, wherein the TENSORFLOW algorithm is used to load and sample the FLAME model, and to fit the FLAME model to the 3D landmarks of the reconstructed mesh.
 6. The computerized method of claim 1, wherein the fitting of the reconstructed mesh to the FLAME model is performed on a cloud-computing based server.
 7. The computerized method of claim 1, wherein the fitting of the reconstructed mesh to the FLAME model is performed on a cloud-computing based server.
 8. The computerized method of claim 7, wherein the output of the cloud-computing based server is communicated to a mobile device for implementing the texture mapping algorithm.
 9. The computerized method of claim 1, wherein the fitting of the reconstructed mesh to the FLAME model is performed on a mobile device.
 10. The computerized method of claim 1, wherein the digital camera comprises a mobile-device digital camera array.
 11. The computerized method of claim 1, wherein the 3D digital image of the user's face is displayed on a mobile device. 